<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>添加配送区域</title>
    <hdjs />
    <js file= '__PUBLIC__/js/mod.base.js,__PUBLIC__/js/mod.area.js,__PUBLIC__/js/mod.region.js' />
    <css file= '__PUBLIC__/css/mod.base.css' />
</head>
<body>
    <form action="" method="post" class="hd-form" name="form" >
        <div class="hd-menu-list">
            <ul>
                <li>
                    <a href="{:U('Shipping/index')}">配送方式列表</a>
                </li>
                <li >
                    <a href="{:U('ShippingArea/index',array('shipping_id'=>$_GET['shipping_id']))}">配送区域列表</a>
                </li>
                <li class="active">
                    <a href="javascript:;">添加配送区域</a>
                </li>
            </ul>
        </div>
        <div class="hd-title-header">温馨提示</div>
        <div class="help">
            <ul>
                <li>{$shippingName} 配送方式！</li>
            </ul>
        </div>
        <div class="hd-title-header">添加配送区域</div>
        <div class="right_content">
            <table class="hd-table hd-table-form">
                <tbody>
                    <tr>
                        <th class="hd-w100">
                            配送区域名称
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="name" class="hd-w200" value="{$data.name}"></td>
                    </tr>
                    <tr>
                        <th class="hd-w100">
                            初始价格(元)
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="fee" class="hd-w200" value="{$data.fee}"> </td>
                    </tr>
                    <tr>
                        <th class="hd-w100">
                            1kg价格后,每1kg价格(元)
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="ext" class="hd-w200" value="{$data.ext}"> </td>
                    </tr>
                     <tr>
                        <th class="hd-w100">
                            配送区域
                            <span class="star">*</span>
                        </th>
                        <td>
                        	<table>
                        		<foreach name='data.area' item='value'>
                        		<tr>
	                        		<td class='area'>
	                        			<span class='hand' onclick='add_area(this)'>[+]</span>
	                        			
			                        	<select name="first[]" >
			                        		<option value="0">请选择</option>
			                        		<foreach name='value.area.first' item='v'>
                                            	<option value="{$v.region_id}" <if condition='in_array($v["region_id"],$value["region"])'> selected='selected' </if>>{$v.region_name}</option>
                                            </foreach>
			                        	</select>
			                        	<select name="second[]" >
			                        		<option value="0">不限</option>
			                        		<foreach name='value.area.second' item='v'>
	                                            <option value="{$v.region_id}" <if condition='in_array($v["region_id"],$value["region"])'> selected='selected' </if>>{$v.region_name}</option>
	                                         </foreach>
			                        	</select>
			                        	<select name="thired[]">
			                        		<option value="0">不限</option>
			                        		 <foreach name='value.area.third' item='v'>
                                             	<option value="{$v.region_id}" <if condition='in_array($v["region_id"],$value["region"])'> selected='selected' </if>>{$v.region_name}</option>
                                            </foreach>
			                        	</select>
	                        		</td>
                        		</tr>
                        		</foreach>
                        	</table>

                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <input type="hidden" name="shipping_id" value="{$Think.get.shipping_id}" />
        <input type="hidden" name="area_id" value="{$Think.get.area_id}" />
        <input type="submit" value="编辑" class="hd-btn hd-btn-sm">
        <input type="button" value="返回" class="hd-btn hd-btn-sm" onclick="location.href='{:U('ShippingArea/index',array('shipping_id'=>$_GET['shipping_id']))}'">
        </form>
</body>
</html>